﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    铁牛农机后台管理系统
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        铁牛农机后台管理系统</h2>
    <div class="loginDialog">
        <%try
          {
              long CurrentTime = DateTime.Now.Ticks;
              long dt1 = DateTime.Now.Ticks + HttpContext.Current.Request.Cookies["cooUserName"].Expires.Ticks;
              long dt2 = DateTime.Now.Ticks + Request.Cookies["cooUserID"].Expires.Ticks;
              long dt3 = DateTime.Now.Ticks + Request.Cookies["cooAvatar"].Expires.Ticks;
              if ( dt1 > CurrentTime && dt2 > CurrentTime && dt3 > CurrentTime)
              {
        %><img alt="<%=Request.Cookies["cooUserName"].Value%>" src="../Avatar/<%=Request.Cookies["cooAvatar"].Value%>"
                class="logined" /><br />
            <div>
                欢迎 <strong>
                    <%=Request.Cookies["cooUserName"].Value%></strong> 回来<br />
            </div>
            <div id="myInfo" class="myInfo" onmousemove="myInfoMouseMove();" onmouseout="myInfoMouseOut();">
                我的信息</div>
            <br />
            <div id="myLogout" class="myLogout" onmousemove="myLogoutMouseMove();" onmouseout="myLogoutMouseOut();">
                <a href="/Account/LogOff">点击退出</a></div><%
                     }
              else
              {
        %><form action="/admin/login" method="post" class="loginForm">
        管理员:<input id="adminLogin" type="text" value="admin" name="loginUser" /><br />
        <br />
        密码: &nbsp;&nbsp;<input id="adminPassword" type="password" name="loginPassword" /><br />
        <br />
        <input type="reset" value="清空" />
        <input type="submit" value="登录" />
        </form>
        <%
            }
          }
          catch
          {
        %><form action="/admin/login" method="post" class="loginForm">
        管理员:<input id="adminLogin1" type="text" value="admin" name="loginUser" /><br />
        <br />
        密码: &nbsp;&nbsp;<input id="adminPassword1" type="password" name="loginPassword" /><br />
        <br />
        <input type="reset" value="清空" />
        <input type="submit" value="登录" />
        </form>
        <% }
          finally
          {
          } %>
        <div class="loginTractor">
        </div>
    </div>
</asp:Content>
